package com.zipkin.trace1.stream.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * @author:wesley
 */
@RestController
public class Trace1Controller {


    @Autowired
    private RestTemplate restTemplate;


    @GetMapping(value = "/trace/stream")
    public String getTrace(){
        return restTemplate.getForEntity("http://zipkin-trace2-stream/trace/stream",String.class).getBody();
    }



}
